package com.simple.microservices.commons.annotation;


import com.simple.microservices.commons.validator.UsernameValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Constraint(validatedBy = UsernameValidator.class)
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Username {
    
    /**
     * 校验不通过的message
     */
    String message() default "请输入正确的账号";

    /**
     * 分组校验
     */
    Class<?>[] groups() default { };


    Class<? extends Payload>[] payload() default { };
}
